package model

import "gorm.io/gorm"

type Admin struct {
	gorm.Model
	Account  string `gorm:"unique;not null;type:varchar(255)"`
	Password string `gorm:"not null;type:varchar(255)"`
	Name     string `gorm:"not null;type:varchar(255)" json:"name"`
	Type     int    `gorm:"default:2;type:tinyint" json:"type"`
}

const (
	AdminType = 1
)

func (m *Admin) TableName() string {
	return "users"
}
